1. Field of the Invention
This invention pertains generally to computer systems and, more particularly, computer systems employing an Advanced Configuration and Power Interface (xe2x80x9cACPIxe2x80x9d) operating system.
2. Description of the Related Art
Computers typically employ xe2x80x9coperating systemsxe2x80x9d to manage the resources used during their operation. Computers generally perform their most basic functions in accordance with their operating system. An operating system is a program that runs other programs known as xe2x80x9capplications programs,xe2x80x9d such as a word processor, invoked by the computer""s user. The operating system also performs the elementary tasks associated with the computer""s use, such as receiving input from the keyboard, sending output to a display or a printer, and controlling peripheral devices such as disk drives and printers. In some computers, the operating system might perform advanced tasks, such as maintaining security. Exemplary operating systems currently used include Windows(copyright), the Microsoft Disk Operating System (xe2x80x9cMS-DOSxe2x80x9d), OS/2, Linux, and UNIX.
Some newer operating systems are implementing the Advanced Configuration and Power Interface (xe2x80x9cACPIxe2x80x9d). The ACPI is a power management specification enabling an operating system to control the amount of power given to each device attached to the computer. Using the ACPI, the operating system can turn off peripheral devices not in use or power-up keyboards when touched. Although relatively new, the ACPI is already well known in the art. In fact, the entire specification is published and freely accessible over the World Wide Web of the Internet at  less than http://www.teleport.com/xcx9cacpi/ greater than .
The ACPI specification contemplates its use in conjunction with operating systems employing a popular feature known as Plug and Play (xe2x80x9cPnPxe2x80x9d). Two current, exemplary PnP operating systems are Windows(copyright) 98 and Windows(copyright) NT. The PnP feature allows the computer""s user to add new devices or to exchange old devices for new devices without setting configuration elements that identify the device within the computer""s configuration. For present purposes, a xe2x80x9cdevicexe2x80x9d is any machine or component that attaches to a computer. Exemplary devices include, but are not limited to xe2x80x9cperipheralxe2x80x9d devices, e.g. disk drives, printers, mice, and modems, and xe2x80x9cintegralxe2x80x9d devices, e.g., monitors and keyboards. Thus, in theory, the user can simply xe2x80x9cplugxe2x80x9d in the new device xe2x80x9candxe2x80x9d the computer can xe2x80x9cplayxe2x80x9d it without further intervention from the user.
One of the challenges in implementing a PnP operating system is testing the ASL PnP code during development. Under some operating systems, notably Windows(copyright) 98- and Windows(copyright) NT-based (now called Windows(copyright) 2000) ACPI operating systems, there is no general purpose application program interface for passing data to and from an ACPI control method. Thus, there is no way to automatically test the ACPI Source Language (xe2x80x9cASLxe2x80x9d) PnP code. The absence of a general purpose application program interface furthermore means that it is not possible to write and automated tested procedure that exercises ASL code such as that used for PnP support.
To test ASL PnP code, designers have therefore had to resort to manual techniques. One technique employs the Windows(copyright) device manager to change the configuration of the device and to use the ACPI HCT namespace viewer to verify that the configuration was changed as requested. This approach is manual and tedious. It is impractical for testing all combinations of PnP configurations, so testing shortcuts must be taken. For instance, testing might only address a portion of the possible PnP configurations rather than all of them. The shortcuts consequently open the door to potential, undetected PnP code errors.
The lack of a general purpose application program interface creates difficulties outside the area of ASL PnP code testing. There are a variety of functions that a designer might wish for the ASL code to perform. However, the inability to pass data to and from the ASL code from the ACPI operating system excludes this option for functions requiring passed data. Thus, the absence of a general purpose application program interface greater restricts designer flexibility.
The present invention is directed to resolving one or all of the problems mentioned above.
In a first aspect, the invention is a method for interfacing a generic program with the ASL code in an ACPI system. The method comprises storing information from a generic program in a shared memory; accessing the ASL code; and retrieving the stored information with the ASL code.
In a second aspect, the invention is a method for testing ASL PnP code in an ACPI system. The method comprises identifying a configurable PnP device; disabling the identified configurable PnP device; testing the disabled, configurable PnP device for a configuration; and verifying that, for the tested configuration, the resulting current resources match the set resources.
In variations of these aspects, the methods may be performed by instructions encoded on a computer-readable, program storage medium and used to program a computer.